<template>
	<el-dialog title="团队本账期未审核拒绝返点" :visible.sync="visible">
		<el-tabs v-model="activeTab">
			<el-tab-pane
				:key="index"
				v-for="(item, index) in tabs"
				:label="item.label"
				:name="item.value"
			></el-tab-pane>
		</el-tabs>
		<Agent v-if="activeTab === 'agent'" :row="row" />
		<Member v-if="activeTab === 'member'" :row="row" />
	</el-dialog>
</template>

<script>
import Agent from './agent/index.vue'
import Member from './member/index.vue'
export default {
  components: {
    Agent,
    Member
  },
  props: {
    value: {
      type: Boolean,
      default: false
    },
    row: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      visible: false,

      activeTab: 'agent',
      tabs: [
        {
          label: '代理',
          value: 'agent'
        },
        {
          label: '会员',
          value: 'member'
        }
      ]
    }
  },
  watch: {
    value: {
      handler(val) {
        this.visible = val
      },
      immediate: true
    },
    visible(newVal) {
      this.$emit('input', newVal)
    }
  }

}
</script>

<style lang="scss" scoped>

</style>
